class fuheyucelist {
  int code;
  String message;
  Result result;
  bool success;
  int timestamp;

  fuheyucelist(
      {this.code, this.message, this.result, this.success, this.timestamp});

  fuheyucelist.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    message = json['message'];
    result =
    json['result'] != null ? new Result.fromJson(json['result']) : null;
    success = json['success'];
    timestamp = json['timestamp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['message'] = this.message;
    if (this.result != null) {
      data['result'] = this.result.toJson();
    }
    data['success'] = this.success;
    data['timestamp'] = this.timestamp;
    return data;
  }
}

class Result {
  double averageValue;
  List<LoadForecastCurveVoList> loadForecastCurveVoList;
  String maxCreateTime;
  double maxValue;
  String minCreateTime;
  double minValue;
  String name;
  List<RealTimeCurveVoList> realTimeCurveVoList;

  Result(
      {this.averageValue,
        this.loadForecastCurveVoList,
        this.maxCreateTime,
        this.maxValue,
        this.minCreateTime,
        this.minValue,
        this.name,
        this.realTimeCurveVoList});

  Result.fromJson(Map<String, dynamic> json) {
    averageValue = json['averageValue'];
    if (json['loadForecastCurveVoList'] != null) {
      loadForecastCurveVoList = new List<LoadForecastCurveVoList>();
      json['loadForecastCurveVoList'].forEach((v) {
        loadForecastCurveVoList.add(new LoadForecastCurveVoList.fromJson(v));
      });
    }
    maxCreateTime = json['maxCreateTime'];
    maxValue = json['maxValue'];
    minCreateTime = json['minCreateTime'];
    minValue = json['minValue'];
    name = json['name'];
    if (json['realTimeCurveVoList'] != null) {
      realTimeCurveVoList = new List<RealTimeCurveVoList>();
      json['realTimeCurveVoList'].forEach((v) {
        realTimeCurveVoList.add(new RealTimeCurveVoList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['averageValue'] = this.averageValue;
    if (this.loadForecastCurveVoList != null) {
      data['loadForecastCurveVoList'] =
          this.loadForecastCurveVoList.map((v) => v.toJson()).toList();
    }
    data['maxCreateTime'] = this.maxCreateTime;
    data['maxValue'] = this.maxValue;
    data['minCreateTime'] = this.minCreateTime;
    data['minValue'] = this.minValue;
    data['name'] = this.name;
    if (this.realTimeCurveVoList != null) {
      data['realTimeCurveVoList'] =
          this.realTimeCurveVoList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class LoadForecastCurveVoList {
  String id;
  String xvalue;
  double yvalue;

  LoadForecastCurveVoList({this.id, this.xvalue, this.yvalue});

  LoadForecastCurveVoList.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    xvalue = json['xvalue'];
    yvalue = json['yvalue'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['xvalue'] = this.xvalue;
    data['yvalue'] = this.yvalue;
    return data;
  }
}

class RealTimeCurveVoList {
  String xvalue;
  double yvalue;

  RealTimeCurveVoList({this.xvalue, this.yvalue});

  RealTimeCurveVoList.fromJson(Map<String, dynamic> json) {
    xvalue = json['xvalue'];
    yvalue = json['yvalue'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['xvalue'] = this.xvalue;
    data['yvalue'] = this.yvalue;
    return data;
  }
}
